.container
  %h2 Sign up
  = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
    = devise_error_messages!
    .form-group.field
      = f.label :email, class: "required"
      %br/
      = f.email_field :email, autofocus: true, class: 'form-control', required: true
    .form-group.field
      = f.label :password
      - if @validatable
        %em
          (#{@minimum_password_length} characters minimum)
      %br/
      = f.password_field :password, autocomplete: "off", class: 'form-control'
    .form-group.field
      = f.label :password_confirmation
      %br/
      = f.password_field :password_confirmation, autocomplete: "off", class: 'form-control'
    .form-group.field
      = f.label :first_name, class: "required"
      %br/
      = f.text_field :first_name, autofocus: true, class: 'form-control', required: true
    .form-group.field
      = f.label :last_name, class: "required"
      %br/
      = f.text_field :last_name, autofocus: true, class: 'form-control', required: true
    .form-group.field
      = f.label "Name Abbreviation", class: "required"
      %em
        (Kürzel)
      %br/
      = f.text_field :name_abbreviation, autofocus: true, class: 'form-control', required: true
    = f.fields_for :affiliations, resource.affiliations.build do |a|
      = render "devise/shared/affiliations", f: a, disabled: false

    = render 'devise/shared/pn_and_tos'

    .form-group.actions
      %input{:style=>"display:none;"}
      = f.submit "Sign up", class: 'btn btn-primary'

  = render "devise/shared/links"

  = link_to "Back", root_path
